<? $data = array(
    '1' => 'Accepted',
    '2' => 'Wrong answer',
    '3' => 'Time limit exceeded',
    '4' => 'Presentation Error',
    '5' => 'Compilation error',
    '6' => 'Memory limit exceeded',
    '7' => 'Runtime error',
    '8' => 'Compiling',
    '9' => 'Running',
    '10' => 'Waiting'
);?>
<div class="one_two_wrap fl_left">
    <div class="widget">
        <div class="widget_title"><span class="iconsweet">%</span>
            <h5> №<?= $this->source[0]['source_id']; ?> баштапкы код,  №<?= $this->source[0]['problem_id']; ?> - маселе </h5>
        </div>
        <div class="widget_body">
            <div class="content_pad" >
                <pre class="code" lang="js"><?= htmlspecialchars($this->source[0]['body']); ?></pre>
            </div>
        </div>
    </div>
</div>
<div class="one_two_wrap fl_right">
    <div class="widget">
        <div class="widget_title"><span class="iconsweet">%</span>
            <h5>Берилген тестердин жыйынтыктары</h5>
        </div>
        <div class="widget_body">
            <table border="0" width="100%" class="activity_datatable" cellspacing="0" cellpadding="8">
                <tr>
                    <th width='10%'>Тест</th>
                    <th width='50%'>Результат</th>
                    <th width='20%'>Время</th>
                    <th width='20%'>Память</th>
                </tr>
                <? foreach ($this->testResult as $value) : ?>
                <tr align=center>
                    <td align=right>
                        <?= $value['test_num'] ?>
                    </td>

                    <td style="color:
                                            <? if ($value['result_id'] == 1) :?> 
                                                #008000 
                                            <? elseif ($value['result_id'] >= 2 && $value['result_id'] <= 7 ) :?> 
                                                #E3170D 
                                            <? endif; ?>">
                        <?= $data[intval($value['result_id'])]; ?>
                    </td>

                    <td>
                        <?= $value['time_limit']; ?>
                    </td>

                    <td>
                        <?= $value['memory_limit']; ?> Кб            
                    </td>
                </tr>
                <? endforeach;?>
            </table>
        </div>
    </div>
</div>